<template>
  <div class="app-container">
    <el-descriptions class="margin-top" title="个人学籍信息" :column="2" border>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-user"></i>
          学院
        </template>
        {{ studentInfo.depName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-mobile-phone"></i>
          专业
        </template>
        {{ studentInfo.subjectName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-location-outline"></i>
          学号
        </template>
        {{ studentInfo.studentNum }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-tickets"></i>
          班级名称
        </template>
        {{ studentInfo.clazzName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-tickets"></i>
          姓名
        </template>
        {{ studentInfo.studentName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          出生日期
        </template>
        {{ studentInfo.birth }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          民族
        </template>
        <dict-tag :options="dict.type.nation" :value="studentInfo.nation"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          政治面貌
        </template>
        <dict-tag :options="dict.type.politics_status" :value="studentInfo.politicsStatus"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          入学时间
        </template>
        {{ studentInfo.enterTime }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          毕业时间
        </template>
        {{ studentInfo.graduateTime }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          身份证号
        </template>
        {{ studentInfo.idCard }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          在校状态
        </template>
        <dict-tag :options="dict.type.state_school" :value="studentInfo.stateSchool"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          年级
        </template>
        {{ studentInfo.grade}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          学制
        </template>
        <dict-tag :options="dict.type.educational_system" :value="studentInfo.educationalSystem"/>
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script>
import { getStudentGradeInfo } from '@/api/information/studentInfo'

export default {
  name: 'Info',
  dicts: ['educational_system', 'state_school', 'nation', 'politics_status'],
  data() {
    return {
      studentInfo: {}
    }
  },
  created() {
    this.getInfo()
  },
  methods: {
    getInfo() {
      getStudentGradeInfo().then(response => {
        this.studentInfo = response.data
      })
    }
  }
}
</script>

